package day4.zuoye;

public class Test12 {
    public static void main(String[] args) {
        int i,a,b,c,d;
        for(i=1000;i<=9999;i++){
            a=i/1000;
            b=(i/100)%10;
            c=(i/10)%10;
            d=i%10;
            if(i==a*a*a*a+b*b*b*b+c*c*c*c+d*d*d*d){
                System.out.println(i);
            }
        }
    }
}
